import request from '@/utils/req'

const {$httpRequest} = window

const extentConfig = {
    // 是否直接继承main主应用的request
    extendRequestForMain: true
}

const rq = (args) => {
    let defaultReq = extentConfig.extendRequestForMain ? ($httpRequest || request) : request
    if (!args.baseURL) args.baseURL = import.meta.env.VITE_APP_BASE_API
    return defaultReq(args)
}


export default rq